import { ModuleWithProviders } from '@angular/core'
import { Routes, RouterModule } from '@angular/router'

/**
 * 路由blank：作为中转跳转，解决菜单栏不能刷新的问题
 * 所有路由配置采用懒加载方式配置，提高首页加载速度
 */
export const routes: Routes = [
  {
    path: 'user',
    loadChildren: 'app/+system/+user/user.module#UserModule'
  },
  {
    path: 'user/user-page',
    loadChildren: 'app/+system/+user-page/user-page.module#UserPageModule'
  },
  {
    path: 'user/authorize',
    loadChildren: 'app/+system/+authorize/authorize.module#AuthorizeModule'
  },
  {
    path: 'role',
    loadChildren: 'app/+system/+role/role.module#RoleModule'
  },
  {
    path: 'role/role-page',
    loadChildren: 'app/+system/+role-page/role-page.module#RolePageModule'
  },
  {
    path: 'role/role-authorize',
    loadChildren: 'app/+system/+role-authorize/role-authorize.module#RoleAuthorizeModule'
  },
  {
    path: 'resource',
    loadChildren: 'app/+system/+resource/resource.module#ResourceModule'
  },
  {
    path: 'resource/resource-page',
    loadChildren: 'app/+system/+resource-page/resource-page.module#ResourcePageModule'
  },
  {
    path: 'company',
    loadChildren: 'app/+system/+company/company.module#CompanyModule'
  },
  {
    path: 'company/company-page',
    loadChildren: 'app/+system/+company-page/company-page.module#CompanyPageModule'
  },
  {
    path: 'outsource',
    loadChildren: 'app/+system/+outsource/outsource.module#OutsourceModule'
  },
  {
    path: 'outsource/outsource-page',
    loadChildren: 'app/+system/+outsource-page/outsource-page.module#OutsourcePageModule'
  },
  {
    path: 'car',
    loadChildren: 'app/+system/+car/device.module#DeviceModule'
  },
  {
    path: 'project-car',
    loadChildren: 'app/+system/+project-car/project-car.module#ProjectCarModule'
  },
  {
    path: 'car/car-page',
    loadChildren: 'app/+system/+car-page/car-page.module#CarPageModule'
  },
  {
    path: 'car/car-station',
    loadChildren: 'app/+system/+car-station/car-station.module#CarStationModule'
  },
  {
    path: 'device-store',
    loadChildren: 'app/+system/+device-store/device-store.module#DeviceStoreModule'
  },
  {
    path: 'device-store/device-page',
    loadChildren: 'app/+system/+device-page/device-page.module#DevicePageModule'
  },
  {
    path: 'blank',
    loadChildren: 'app/+system/+blank/blank.module#BlankModule'
  },
  {
    path: 'renewal-manage',
    loadChildren: 'app/+system/+renewal-manage/renewal-manage.module#RenewalManageModule'
  },
  {
    path: 'docking-manage',
    loadChildren: 'app/+system/+docking-manage/docking-manage.module#DockingManageModule'
  },
  {
    path: 'device-state',
    loadChildren: 'app/+system/+device-state/device-state.module#DeviceStateModule'
  },
  {
    path: 'header-manage',
    loadChildren: 'app/+system/+header-manage/header-manage.module#HeaderManageModule'
  },
  {
    path: 'repair-plan',
    loadChildren: 'app/+system/+repair-plan/repair-plan.module#RepairPlanModule'
  },
  {
    path: 'user-type',
    loadChildren: 'app/+system/+user-type/user-type.module#UserTypeModule'
  },
  {
    path: 'project-config',
    loadChildren: 'app/+system/+project-config/project-config.module#ProjectConfigModule'
  },
  {
    path: 'project-nav',
    loadChildren: 'app/+system/+project-nav/project-nav.module#ProjectNavModule'
  },
  {
    path: 'contract-config',
    loadChildren: 'app/+system/+contract-config/contract-config.module#ContractConfigModule'
  },
  {
    path: 'docking-bill', //对接费账单管理
    loadChildren: 'app/+system/+docking-bill/docking-bill.module#DockingBillModule'
  },
  {
    path: 'fund-details', //资金明细
    loadChildren: 'app/+system/+fund-details/fund-details.module#FundDetailsModule'
  },
  {
    path: 'corporate-account',
    loadChildren: 'app/+system/+corporate-account/corporate-account.module#CorporateAccountModule'
  },
  {
    path: 'bill-details',
    loadChildren: 'app/+system/+bill-details/bill-details.module#BillDetailsModule'
  },
  {
    path: 'billing-details',
    loadChildren: 'app/+system/+billing-details/billing-details.module#BillingDetailsModule'
  },
  {
    path: 'service-charge-bill',
    loadChildren: 'app/+system/+service-charge-bill/service-charge-bill.module#ServiceChargeBillModule'
  },
  {
    path: 'trailer-manage',
    loadChildren: 'app/+system/+trailer-manage/trailer-manage.module#TrailerManageModule'
  },
  {
    path: 'renewal-record',
    loadChildren: 'app/+system/+renewal-record/renewal-record.module#RenewalRecordModule'
  },
  {
    path: 'kafka-push-config',
    loadChildren: 'app/+system/+kafka-push-config/kafka-push-config.module#KafkaPushConfigModule'
  }
]

export const routing = RouterModule.forChild(routes)
